package com.zsck.zsgy.ui.main.fragment.simplecircle.adapter

import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.zsck.zsgy.ui.main.fragment.FindHouseFragment
import com.zsck.zsgy.ui.main.fragment.HomeFragment
import com.zsck.zsgy.ui.main.fragment.MineFragment
import com.zsck.zsgy.ui.main.fragment.SimpleCircleFragment
import com.zsck.zsgy.ui.main.fragment.simplecircle.SimpleActivityFragment
import com.zsck.zsgy.ui.main.fragment.simplecircle.SimpleListFragment
import com.zsck.zsgy.util.Constants

class SimpleVPAdapter(fragment: Fragment) : FragmentStateAdapter(fragment) {
    override fun getItemCount(): Int {

        return Constants.simpleCircleTab?.size!!
    }

    override fun createFragment(position: Int): Fragment {
        when (position) {
            0 -> {return SimpleActivityFragment.newInstance()}
            1 -> {return SimpleListFragment.newInstance(2)}
            2 -> {return  SimpleListFragment.newInstance(3)}
            else -> {return SimpleListFragment.newInstance(4)}

        }
    }
}